server: fix checking disk offering access for snapshot volume#3791
Conversation
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
you didn't need to open a new PR @shwstppr . you can force push to your own branch and then change the base branch on your PR. |
|
@DaanHoogland didn't know that, will keep in mind for future. Thanks |
DaanHoogland
left a comment
There was a problem hiding this comment.
self quoting: "... the bug existed IMHO because of the method being 200 lines long and thus illegible. I will let this pass to honour history but if you have time please factor out the method contents to a helper class or a set of helper methods?"
the code is fixed by moving check access on the offering behind a null check and creating an offering on the fly. This method is not maintainable as there are more and needs TLC/refatcorring
|
Milestone for this one? |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✖centos7 ✖debian. JID-668 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-686 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-840)
|
|
I don't see a relation of the errors with the change, @rhtyd @shwstppr ? |
|
Agree @DaanHoogland |
…#3791) Fixes apache#3783 As reported in the issue, creating volumes from pure snapshot fails with NPE. This is due to order of calls where disk offering access is checked before checking disk offering value. This PR fixes the same. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Fixes #3783
As reported in the issue, creating volumes from pure snapshot fails with NPE. This is due to order of calls where disk offering access is checked before checking disk offering value. This PR fixes the same.
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?